#ifndef _Prefix_H_
#define _Prefix_H_

/*
 * =============================================================================
 *
 *       Filename:  Prefix.hpp
 *
 *    Description:  This class is used in mining frequent item-lists from 
 *                  fp-trees. It represents the prefix of an itemset. See 
 *                  CLOSET+ article for more info.
 *
 *        Version:  1.0
 *        Created:  04/19/2009 12:15:12 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Tayfun Sen (ts), tayfun.sen { at.at.at } tayfunsen . com
 *        Company:  Hayal Isleri, LLC
 *
 * =============================================================================
 */

class Prefix {
    public:
    Prefix() : count(0) {}
    int count;
    vector<string> items;

    void addWithCount(string item, int argCount) {
        items.push_back(item);
        if (count == 0 || argCount < count)
            count = argCount;
    }
};

#endif
